<?php
/**
 * Purpose:
 * 新文件
 * File Name:
 * My.php
 * Author:
 * 武当山道士<912900700@qq.com>
 * Create:
 * 2019/9/29 19:11
 */

namespace app\api\controller;


use app\common\controller\Api;

class My extends Api
{
    protected $noNeedLogin = '*'; // TODO  必须去掉

    /**
     * 获取订单标签列表
     * @throws
     */
    public function getOrderTags()
    {
        $list = model('Icon')->getIconsByType(2);
        $this->success('success', $list);
    }

    public function getMyOrders()
    {
        $user_id = $this->getUserId();
        $status = input('status',null);
        $key_word = input('key_word',null);
        $list = model('Order')->searchOrders($user_id, $status, $key_word);
        $this->success('success', $list);
    }

}